"""Country data obtained from https://github.com/samayo/country-json"""

countries = [
    {"country": "Austria", "population": 8_840_521},
    {"country": "Canada", "population": 37_057_765},
    {"country": "Cuba", "population": 11_338_138},
    {"country": "Germany", "population": 82_905_782},
    {"country": "Norway", "population": 5_311_916},
    {"country": "Philippines", "population": 106_651_922},
    {"country": "Poland", "population": 37_974_750},
    {"country": "Dominican Republic", "population": 10_627_165},
    {"country": "Scotland", "population": 5_424_800},
    {"country": "United States", "population": 326_687_501},
]

all_countries = [
    {"country": "Afghanistan", "population": 37_172_386},
    {"country": "Albania", "population": 2_866_376},
    {"country": "Algeria", "population": 42_228_429},
    {"country": "American Samoa", "population": 55_465},
    {"country": "Andorra", "population": 77_006},
    {"country": "Angola", "population": 30_809_762},
    {"country": "Anguilla", "population": 15_094},
    {"country": "Antarctica", "population": 1_106},
    {"country": "Antigua and Barbuda", "population": 96_286},
    {"country": "Argentina", "population": 44_494_502},
    {"country": "Armenia", "population": 2_951_776},
    {"country": "Aruba", "population": 105_845},
    {"country": "Australia", "population": 24_982_688},
    {"country": "Austria", "population": 8_840_521},
    {"country": "Azerbaijan", "population": 9_939_800},
    {"country": "Bahamas", "population": 385_640},
    {"country": "Bahrain", "population": 1_569_439},
    {"country": "Bangladesh", "population": 161_356_039},
    {"country": "Barbados", "population": 286_641},
    {"country": "Belarus", "population": 9_483_499},
    {"country": "Belgium", "population": 11_433_256},
    {"country": "Belize", "population": 383_071},
    {"country": "Benin", "population": 11_485_048},
    {"country": "Bermuda", "population": 63_973},
    {"country": "Bhutan", "population": 754_394},
    {"country": "Bolivia", "population": 11_353_142},
    {"country": "Bosnia and Herzegovina", "population": 3_323_929},
    {"country": "Botswana", "population": 2_254_126},
    {"country": "Bouvet Island", "population": 0},
    {"country": "Brazil", "population": 209_469_333},
    {"country": "British Indian Ocean Territory", "population": 0},
    {"country": "Brunei", "population": 428_962},
    {"country": "Bulgaria", "population": 7_025_037},
    {"country": "Burkina Faso", "population": 19_751_535},
    {"country": "Burundi", "population": 11_175_378},
    {"country": "Cambodia", "population": 16_249_798},
    {"country": "Cameroon", "population": 25_216_237},
    {"country": "Canada", "population": 37_057_765},
    {"country": "Cape Verde", "population": 543_767},
    {"country": "Cayman Islands", "population": 64_174},
    {"country": "Central African Republic", "population": 4_666_377},
    {"country": "Chad", "population": 15_477_751},
    {"country": "Chile", "population": 18_729_160},
    {"country": "China", "population": 1_392_730_000},
    {"country": "Christmas Island", "population": 1_402},
    {"country": "Cocos (Keeling) Islands", "population": 596},
    {"country": "Colombia", "population": 49_648_685},
    {"country": "Comoros", "population": 832_322},
    {"country": "Congo", "population": 5_244_363},
    {"country": "Cook Islands", "population": 17_379},
    {"country": "Costa Rica", "population": 4_999_441},
    {"country": "Croatia", "population": 4_087_843},
    {"country": "Cuba", "population": 11_338_138},
    {"country": "Cyprus", "population": 1_189_265},
    {"country": "Czech Republic", "population": 10_629_928},
    {"country": "Denmark", "population": 5_793_636},
    {"country": "Djibouti", "population": 958_920},
    {"country": "Dominica", "population": 71_625},
    {"country": "Dominican Republic", "population": 10_627_165},
    {"country": "East Timor", "population": 1_267_972},
    {"country": "Ecuador", "population": 17_084_357},
    {"country": "Egypt", "population": 98_423_595},
    {"country": "El Salvador", "population": 6_420_744},
    {"country": "England", "population": 55_619_400},
    {"country": "Equatorial Guinea", "population": 1_308_974},
    {"country": "Eritrea", "population": 6_213_972},
    {"country": "Estonia", "population": 1_321_977},
    {"country": "Ethiopia", "population": 109_224_559},
    {"country": "Falkland Islands", "population": 2_840},
    {"country": "Faroe Islands", "population": 48_497},
    {"country": "Fiji Islands", "population": 883_483},
    {"country": "Finland", "population": 5_515_525},
    {"country": "France", "population": 66_977_107},
    {"country": "French Guiana", "population": 290_691},
    {"country": "French Polynesia", "population": 277_679},
    {"country": "French Southern territories", "population": 0},
    {"country": "Gabon", "population": 2_119_275},
    {"country": "Gambia", "population": 2_280_102},
    {"country": "Georgia", "population": 3_726_549},
    {"country": "Germany", "population": 82_905_782},
    {"country": "Ghana", "population": 29_767_108},
    {"country": "Gibraltar", "population": 33_718},
    {"country": "Greece", "population": 10_731_726},
    {"country": "Greenland", "population": 56_025},
    {"country": "Grenada", "population": 111_454},
    {"country": "Guadeloupe", "population": 395_700},
    {"country": "Guam", "population": 165_768},
    {"country": "Guatemala", "population": 17_247_807},
    {"country": "Guinea", "population": 12_414_318},
    {"country": "Guinea-Bissau", "population": 1_874_309},
    {"country": "Guyana", "population": 779_004},
    {"country": "Haiti", "population": 11_123_176},
    {"country": "Heard Island and McDonald Islands", "population": 0},
    {"country": "Holy See (Vatican City State)", "population": 825},
    {"country": "Honduras", "population": 9_587_522},
    {"country": "Hong Kong", "population": 7_451_000},
    {"country": "Hungary", "population": 9_775_564},
    {"country": "Iceland", "population": 352_721},
    {"country": "India", "population": 1_352_617_328},
    {"country": "Indonesia", "population": 267_663_435},
    {"country": "Iran", "population": 81_800_269},
    {"country": "Iraq", "population": 38_433_600},
    {"country": "Ireland", "population": 4_867_309},
    {"country": "Israel", "population": 8_882_800},
    {"country": "Italy", "population": 60_421_760},
    {"country": "Ivory Coast", "population": 25_069_229},
    {"country": "Jamaica", "population": 2_934_855},
    {"country": "Japan", "population": 126_529_100},
    {"country": "Jordan", "population": 9_956_011},
    {"country": "Kazakhstan", "population": 18_272_430},
    {"country": "Kenya", "population": 51_393_010},
    {"country": "Kiribati", "population": 115_847},
    {"country": "Kuwait", "population": 4_137_309},
    {"country": "Kyrgyzstan", "population": 6_322_800},
    {"country": "Laos", "population": 7_061_507},
    {"country": "Latvia", "population": 1_927_174},
    {"country": "Lebanon", "population": 6_848_925},
    {"country": "Lesotho", "population": 2_108_132},
    {"country": "Liberia", "population": 4_818_977},
    {"country": "Libyan Arab Jamahiriya", "population": 6_678_567},
    {"country": "Liechtenstein", "population": 37_910},
    {"country": "Lithuania", "population": 2_801_543},
    {"country": "Luxembourg", "population": 607_950},
    {"country": "Macao", "population": 631_636},
    {"country": "North Macedonia", "population": 2_084_367},
    {"country": "Madagascar", "population": 26_262_368},
    {"country": "Malawi", "population": 18_143_315},
    {"country": "Malaysia", "population": 31_528_585},
    {"country": "Maldives", "population": 515_696},
    {"country": "Mali", "population": 19_077_690},
    {"country": "Malta", "population": 484_630},
    {"country": "Marshall Islands", "population": 58_413},
    {"country": "Martinique", "population": 376_480},
    {"country": "Mauritania", "population": 4_403_319},
    {"country": "Mauritius", "population": 1_265_303},
    {"country": "Mayotte", "population": 270_372},
    {"country": "Mexico", "population": 126_190_788},
    {"country": "Micronesia, Federated States of", "population": 112_640},
    {"country": "Moldova", "population": 2_706_049},
    {"country": "Monaco", "population": 38_682},
    {"country": "Mongolia", "population": 3_170_208},
    {"country": "Montenegro", "population": 631_219},
    {"country": "Montserrat", "population": 5_900},
    {"country": "Morocco", "population": 36_029_138},
    {"country": "Mozambique", "population": 29_495_962},
    {"country": "Myanmar", "population": 53_708_395},
    {"country": "Namibia", "population": 2_448_255},
    {"country": "Nauru", "population": 12_704},
    {"country": "Nepal", "population": 28_087_871},
    {"country": "Netherlands", "population": 17_231_624},
    {"country": "Netherlands Antilles", "population": 227_049},
    {"country": "New Caledonia", "population": 284_060},
    {"country": "New Zealand", "population": 4_841_000},
    {"country": "Nicaragua", "population": 6_465_513},
    {"country": "Niger", "population": 22_442_948},
    {"country": "Nigeria", "population": 195_874_740},
    {"country": "Niue", "population": 1_624},
    {"country": "Norfolk Island", "population": 2_169},
    {"country": "North Korea", "population": 25_549_819},
    {"country": "Northern Ireland", "population": 1_885_400},
    {"country": "Northern Mariana Islands", "population": 56_882},
    {"country": "Norway", "population": 5_311_916},
    {"country": "Oman", "population": 4_829_483},
    {"country": "Pakistan", "population": 212_215_030},
    {"country": "Palau", "population": 17_907},
    {"country": "Palestine", "population": 4_569_087},
    {"country": "Panama", "population": 4_176_873},
    {"country": "Papua New Guinea", "population": 8_606_316},
    {"country": "Paraguay", "population": 6_956_071},
    {"country": "Peru", "population": 31_989_256},
    {"country": "Philippines", "population": 106_651_922},
    {"country": "Pitcairn", "population": 67},
    {"country": "Poland", "population": 37_974_750},
    {"country": "Portugal", "population": 10_283_822},
    {"country": "Puerto Rico", "population": 3_195_153},
    {"country": "Qatar", "population": 2_781_677},
    {"country": "Reunion", "population": 859_959},
    {"country": "Romania", "population": 19_466_145},
    {"country": "Russian Federation", "population": 144_478_050},
    {"country": "Rwanda", "population": 12_301_939},
    {"country": "Saint Helena", "population": 6_600},
    {"country": "Saint Kitts and Nevis", "population": 52_441},
    {"country": "Saint Lucia", "population": 181_889},
    {"country": "Saint Pierre and Miquelon", "population": 5_888},
    {"country": "Saint Vincent and the Grenadines", "population": 110_210},
    {"country": "Samoa", "population": 196_130},
    {"country": "San Marino", "population": 33_785},
    {"country": "Sao Tome and Principe", "population": 211_028},
    {"country": "Saudi Arabia", "population": 33_699_947},
    {"country": "Scotland", "population": 5_424_800},
    {"country": "Senegal", "population": 15_854_360},
    {"country": "Serbia", "population": 6_963_764},
    {"country": "Seychelles", "population": 96_762},
    {"country": "Sierra Leone", "population": 7_650_154},
    {"country": "Singapore", "population": 5_638_676},
    {"country": "Slovakia", "population": 5_446_771},
    {"country": "Slovenia", "population": 2_073_894},
    {"country": "Solomon Islands", "population": 652_858},
    {"country": "Somalia", "population": 15_008_154},
    {"country": "South Africa", "population": 57_779_622},
    {
        "country": "South Georgia and the South Sandwich Islands",
        "population": 30,
    },
    {"country": "South Korea", "population": 51_606_633},
    {"country": "South Sudan", "population": 10_975_920},
    {"country": "Spain", "population": 46_796_540},
    {"country": "Sri Lanka", "population": 21_670_000},
    {"country": "Sudan", "population": 41_801_533},
    {"country": "Suriname", "population": 575_991},
    {"country": "Svalbard and Jan Mayen", "population": 2_572},
    {"country": "Swaziland", "population": 1_136_191},
    {"country": "Sweden", "population": 10_175_214},
    {"country": "Switzerland", "population": 8_513_227},
    {"country": "Syria", "population": 16_906_283},
    {"country": "Tajikistan", "population": 9_100_837},
    {"country": "Tanzania", "population": 56_318_348},
    {"country": "Thailand", "population": 69_428_524},
    {"country": "The Democratic Republic of Congo", "population": 84_068_091},
    {"country": "Togo", "population": 7_889_094},
    {"country": "Tokelau", "population": 1_411},
    {"country": "Tonga", "population": 103_197},
    {"country": "Trinidad and Tobago", "population": 1_389_858},
    {"country": "Tunisia", "population": 11_565_204},
    {"country": "Turkey", "population": 82_319_724},
    {"country": "Turkmenistan", "population": 5_850_908},
    {"country": "Turks and Caicos Islands", "population": 37_665},
    {"country": "Tuvalu", "population": 11_508},
    {"country": "Uganda", "population": 42_723_139},
    {"country": "Ukraine", "population": 44_622_516},
    {"country": "United Arab Emirates", "population": 9_630_959},
    {"country": "United Kingdom", "population": 66_460_344},
    {"country": "United States", "population": 326_687_501},
    {"country": "United States Minor Outlying Islands", "population": 300},
    {"country": "Uruguay", "population": 3_449_299},
    {"country": "Uzbekistan", "population": 32_955_400},
    {"country": "Vanuatu", "population": 292_680},
    {"country": "Venezuela", "population": 28_870_195},
    {"country": "Vietnam", "population": 95_540_395},
    {"country": "Virgin Islands, British", "population": 29_802},
    {"country": "Virgin Islands, U.S.", "population": 106_977},
    {"country": "Wales", "population": 3_139_000},
    {"country": "Wallis and Futuna", "population": 15_289},
    {"country": "Western Sahara", "population": 652_271},
    {"country": "Yemen", "population": 28_498_687},
    {"country": "Zambia", "population": 17_351_822},
    {"country": "Zimbabwe", "population": 14_439_018},
]

country_lists = [countries, all_countries]


def build_list(size, fill, value, at_position):
    return [value if i == at_position else fill for i in range(size)]
